#include <dao.h>
#include <btBulletDynamicsCommon.h>

#include "btCollisionShape.h"
#include "btStaticPlaneShape.h"

static void construct(DaoContext *ctx, DValue *p[], int N) {
    btVector3		*normal = (btVector3*) DaoCData_GetData(p[0]->v.cdata);
    btStaticPlaneShape	*ptr = new btStaticPlaneShape(*normal, p[1]->v.f);

    DaoCData *cdata = DaoContext_PutCData(ctx, ptr, &btStaticPlaneShapeTyper);
};

static void destruct(void *self) {
//    delete (btStaticPlaneShape*) self;
}

static DaoFuncItem meth[] = {
    { construct, "btStaticPlaneShape(normal:btVector3, constant:float)" },
    { NULL, NULL }
};

DaoTypeBase btStaticPlaneShapeTyper = {
    "btStaticPlaneShape",
    NULL,
    NULL,               		/* constant */
    meth,       			/* methods */
    { &btCollisionShapeTyper, NULL },   /* parent type */
    { NULL },
    destruct,
    NULL
};
